var Dog=require("./dog.js");
var dog1=new Dog("taidi",10);
dog1.on("bark",function(){
    console.log(this.name+"barked,energy left"+this.energy);
})
var dog2=new Dog("zangao",8);
dog2.on("bark",function(){
    console.log(this.name+"barked,energy left"+this.energy);
})